Embodiments relate to models utilizing data, and in particular, to methods and systems providing a code generation framework for an Application Program Interface (API) for models.
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
Models of increasing sophistication are being developed that rely upon volumes of stored data. Conventionally, access to create and modify such models occurs exclusively through a custom Application Program Interface (API) dedicated for this purpose.
Reliance upon such a single, custom API for modeling, however, can be limiting to a user. For example, the EMF (Eclipse Modelling Framework) is widely used. Ecore models are the metamodel for describing models in EMF.
Models created with EMF describe the properties of a domain of interest (e.g., the database domain, the car domain, etc.) the model of the stored data, for example as may be present in a database. One example of a database is the HANA in memory database available from SAP AG of Walldorf, Germany. The HANA Studio software is designed to allow HANA to interact with a modeling program such as EMF.
In the HANA Studio, there are multiple graphical editors built on top of the Ecore models. Examples of such graphical editors include but are not limited to attribute view, calculation view, Enterprise Performance Management (EPM) editor, etc. To create such model instances (EPM, attribute views, calculation views), the user has to use the graphical editors.
Alternatively, a user can write an xml representation of the serialized version of such a model. This, however, is labor-intensive and a convenient way to programmatically create such model instances is lacking.
Here, it is noted that an API (provided by the EMF framework) already exists, but it is in JAVA. However, the developers of HANA XS applications need an API in another language.
To try and create the API manually is a complicated and time consuming task. For example, developers of HANA XS applications use the XSJS language, from which APIs for creating Ecore instances, can be implemented. Again however this is a complicated and time consuming task, as such APIs can comprise 20,000-30,000 lines of code for more complex Ecore models.
Furthermore, it is noted that the Ecore models may change frequently. Thus any API's implemented from scratch would also need to be changed, to ensure coherence with the corresponding Ecore metamodels. This causes additional overhead and makes the code difficult to maintain.
Accordingly, there is a need for apparatuses and methods for implementing APIs for modeling purposes.